package com.niu.shop.listener.marketing;

import com.niu.core.common.annotation.EventCallback;
import com.niu.shop.event.TestEventDefiner;
import org.springframework.stereotype.Component;

@EventCallback("shop")
@Component
public class TestListener extends TestEventDefiner {

    @Override
    public TestResult handleCallback( TestEvent event) {
        Integer age = event.getAge();
        String name = event.getNameTest();
        TestResult result = new TestResult();
        result.setAge(age);
        result.setNameAge(name + "-" + age.toString());
        return result;
    }
}
